﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Krilib.Control.Surface
{
    public abstract class MessageObject : IVisual, IMouseControllable
    {
        #region Abstracted methods

        public abstract void Composite(Compositor compz);

        public abstract void Draw(Graphics g, CompositeDescriptor desc);

        public abstract bool HitTest(System.Drawing.Point position);

        public abstract void Release();

        #endregion

        #region Virtual methods

        public virtual void OnMouseOver(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseMove(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseEnter(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseLeave(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseClick(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseDoubleClick(object sender, ChainMouseEventArgs e)
        {
            OnMouseClick(sender, e);
        }

        public virtual void OnMouseDown(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        public virtual void OnMouseUp(object sender, ChainMouseEventArgs e)
        {
            e.SetThrowSub();
        }

        #endregion

        #region Virtual properties

        public virtual string HelptipText { get { return null; } }

        #endregion

    }
}
